An asset represents anything that is fungible. It can be more than money, like resources in a game.

entity asset {

Unique identifier for an instance of this entity

key id: byte_array;

Display name of the asset. Need not be unique.

key name: text;

Symbol of this asset, typically an all caps string of three or four letters. Used for display purposes and need not be unique.

key symbol: text;

Number of decimals used by this asset, which will affect how to interpret a balance of this decimal. E.g., 10000 with decimals 1 would be interpreted as 1000,0 while 10000 with decimals 2 would be interpreted as 100,00

decimals: integer;

The rid of the blockchain that is issuing this asset if this is a cross chain asset. For non-cross chain assets, this field will be the same as this blockchain's RID.

key issuing_blockchain_rid: byte_array;

A URL to an icon for this asset. Used only for display purposes in UI applications.

mutable icon_url: text;

The type of asset. Defaults to ASSET_TYPE_FT4

index type: text;

Integer representing the total supply of this asset. Can change as assets is minted/burnt.

mutable total_supply: big_integer;

Attribute that contains additional data to discern assets that are registered with the same name and symbol.

key uniqueness_resolver: byte_array = x"";
}
© 2024 Chromia